package com.demo12;

import java.util.LinkedHashSet;

public class LinkedHashSetDemo {
    public static void main(String[] args) {
        //实例化链表集合
        LinkedHashSet<String> linkedHashSet = new LinkedHashSet<>();

        //添加数据
        linkedHashSet.add("hello");
        linkedHashSet.add("world");
        linkedHashSet.add("JavaEE");
        linkedHashSet.add("JavaEE");


        for (String s:linkedHashSet){
            System.out.println(s);
        }
    }
}
